package com.wn55.hrms.mapper;

import com.wn55.hrms.entity.Position;
import com.wn55.hrms.entity.PositionLevel;
import com.wn55.hrms.service.vo.PositionVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PositionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Position record);

    Position selectByPrimaryKey(Integer id);

    List<Position> selectAll();

    int updateByPrimaryKey(Position record);
@Select("select * from position where did=#{deptId}")
    List<Position> selectByDeptId(Integer deptId);

    /**
     * 查询职位
     * @param name
     * @return
     */
    List<PositionVo> selectPositionByCondition(@Param("name") String name);
}